<div data-form="new_address" class="d-none">
  <%= render 'spree/admin/shared/error_messages', target: address %>
  <%= render 'spree/addresses/form',
                   address_name: 'address',
                   address_form: f,
                   address_type: 'billing',
                   address: address %>
</div>
<% if @order.user.present? && @order.user.addresses.many? %>
  <div data-form="existing_address" class="d-none">
    <%= label_tag :billing_address_id, Spree.t(:existing_address), class: "sr-only" %>
    <%= tom_select_tag :billing_address_id, {include_blank: Spree.t(:existing_address), class: "mb-2", options: @order.user.addresses.map { |a| {id: a.id, name: a.to_s.gsub('<br/>', ", ")}}.as_json, select_data: {action: 'auto-submit#submit'} }  %>
  </div>
<% end %>
